//
//  OuterUserInfo.swift
//  AdapterPattern
//
//  Created by mac on 2017/11/13.
//  Copyright © 2017年 RRC. All rights reserved.
//

import Foundation

//中转角色
public class OuterUserInfo:OuterUser,IUserInfo{
    //员工的基本信息
    private let baseInfo:[String:Any] = OuterUser().getUserBaseInfo()
    //员工的家庭信息
    private let homeInfo:[String:Any] = OuterUser().getUserHomeInfo()
    //工作信息
    private let officeInfo:[String:Any] = OuterUser().getUserOfficeInfo()
    
    //员工名称
    public func getUserName() -> String {
        let userName = self.baseInfo["userName"]
        print(userName!)
        return userName as! String
    }
    //家庭地址
    public func getHomeAddress() -> String {
        let homeAddress = self.homeInfo["homeAddress"]
        print(homeAddress!)
        return homeAddress as! String
    }
    //手机号码
    public func getMobileNumber() -> String {
        let mobileNumber = self.baseInfo["mobileNumber"]
        print(mobileNumber!)
        return mobileNumber as! String
    }
    //办公电话
    public func getOfficeTelNumber() -> String {
        let officeTelNumber = self.officeInfo["officeTelNumber"]
        print(officeTelNumber!)
        return officeTelNumber as! String
    }
    //职位信息
    public func getJobPosition() -> String {
        let jobPosition = self.officeInfo["jobPosition"]
        print(jobPosition!)
        return jobPosition as! String
    }
    //家庭电话号码
    public func getHomeTelNumber() -> String {
        let homeTelNumber = self.homeInfo["homeTelNumber"]
        print(homeTelNumber!)
        return homeTelNumber as! String
    }
    
    
}

